'use strict';
const Controller = require('egg').Controller;

class ShowSettingController extends Controller {
  async getShowSetting() {
    const { ctx } = this;
    const res = await this.service.setting.getShowSetting();
    if (res) {
      ctx.status = 200;
      ctx.body = {
        code: 0,
        data: res,
      };
    } else {
      ctx.status = 500;
      ctx.body = {
        code: -1,
        msg: '获取显示设置失败',
      };
    }
  }
}
module.exports = ShowSettingController;
